package com.itheima.day07.myCollection.test2;

import java.util.ArrayList;
import java.util.Random;

public class Test {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        Random r = new Random();
        for (int i = 0; i < 10; i++) {
            list.add(Integer.valueOf(r.nextInt(11)));
        }

        // 增强for循环
        for(Integer i : list){
            System.out.print(i + " ");
        }
    }
}
